package boni.sort;

import java.util.Comparator;

import boni.infoRazredi.LokalSimple;

public class SortByMesto implements Comparator<LokalSimple>{

	boolean narascajoce = true;
	public SortByMesto(boolean narascajoce){
		this.narascajoce = narascajoce;
	}
	@Override
	public int compare(LokalSimple object1, LokalSimple object2) {
		if(narascajoce)
			return object1.getMesto().compareTo(object2.getMesto()); //vrne int
		else
			return object2.getMesto().compareTo(object1.getMesto()); //vrne int
	}

}
